using System.Configuration;

namespace OrbitOne.Elmah.WebService
{
    public class OrbitOneElmahConfiguration : ConfigurationSection
    {
        #region Properties

        [ConfigurationProperty("HeartbeatInterval", IsRequired = false)]
        public string HeartbeatInterval
        {
            get{ return this["HeartbeatInterval"].ToString(); }
            set { this["HeartbeatInterval"] = value; }
        }

        #endregion

        #region Constructor

        public OrbitOneElmahConfiguration(string heartbeatInterval)
        {
            this.HeartbeatInterval = heartbeatInterval;
        }

        public OrbitOneElmahConfiguration() { }

        #endregion

        #region Static Methods

        public static OrbitOneElmahConfiguration Load()
        {
            return (OrbitOneElmahConfiguration)ConfigurationManager.GetSection("OrbitOneElmahConfiguration");
        }

        #endregion
    }
}

